package com.li.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * Author: Li
 * Date: 2017/12/30
 * Description:
 */

public class VerifyUtil {
    /**
     * 检查手机是否合法
     * @param phone 手机号
     * @return  result
     */
    public static boolean checkPhone(String phone){
        String pattern = "0?(13|14|15|16|17|18)[0-9]{9}";
        Pattern r = Pattern.compile(pattern);
        Matcher m = r.matcher(phone);
        return m.matches();
    }
}
